<template>
  <a-modal
    title="索引库详细内容"
    style="top: 20px;"
    :width="800"
    v-model="visible"
    :footer="null"
  >
    <a-spin :spinning="spinning">
      <a-textarea
        style="white-space: pre-wrap;"
        v-model="infoData"
        :auto-size="{ minRows: 10, maxRows: 100 }"
      />
    </a-spin>
  </a-modal>
</template>
<script>
import { indexLibraryInfo } from '@/api/system'
export default {
  name: 'IndexLibraryDetailModal',
  components: {
  },
  data () {
    return {
      spinning: false,
      visible: false,
      infoData: ''
    }
  },
  methods: {
    info (name) {
      this.visible = true
      this.spinning = true
      indexLibraryInfo(name).then(res => {
         if (res.status === 1) {
           this.infoData = res.data
         }
      }).finally(() => {
        this.spinning = false
      })
    }
  }
}
</script>
